package cn.itsource.org.service.impl;

import cn.itsource.basic.util.AjaxResult;
import cn.itsource.org.domain.Employee;
import cn.itsource.org.service.IEmployeeService;
import cn.itsource.basic.base.service.impl.BaseServiceImpl;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author h
 * @since 2023-07-05
 */
@Service
public class EmployeeServiceImpl extends BaseServiceImpl<Employee> implements IEmployeeService {

    @Override
    @Transactional
    public AjaxResult active(Long id) {
        //找到对应得员工账号
        Employee emp = findOne(id);
        emp.setState(1);
        update(emp);
        return AjaxResult.me();
    }
}
